//
//  ComposeTitleView.swift
//  JGWB
//
//  Created by 付建国 on 2016/10/18.
//  Copyright © 2016年 sher. All rights reserved.
//

import UIKit
import SnapKit

class ComposeTitleView: UIView {
    
    fileprivate lazy var titleLabel : UILabel = UILabel()
    fileprivate lazy var screenNameLabel : UILabel = UILabel()

    override init(frame: CGRect) {
        super.init(frame: frame)
        
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implement")
    }
}

// MARK:- 设置UI
extension ComposeTitleView{
    fileprivate func setupUI(){
        
        addSubview(titleLabel)
        addSubview(screenNameLabel)
        
        titleLabel.snp_makeConstraints { (make) in
            _ = make.centerX.equalTo(self)
            _ = make.top.equalTo(self)
        }
        
        screenNameLabel.snp_makeConstraints { (make) in
            _ = make.centerX.equalTo(titleLabel.snp_centerX)
            _ = make.top.equalTo(titleLabel.snp_bottom).offset(3)
        }
        
        titleLabel.font = UIFont.systemFont(ofSize: 15)
        screenNameLabel.font = UIFont.systemFont(ofSize: 12)
        screenNameLabel.textColor = UIColor.lightGray
      
        titleLabel.text = "发微博"
        screenNameLabel.text = PersonViewModel.shareIntance.account?.screen_name
        
    }
}









